package cn.scw.project.goods.domain;

import cn.scw.framework.aspectj.lang.annotation.Excel;
import cn.scw.framework.web.domain.BaseEntity;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

import java.util.Date;

/**
 * 用户优惠券对象 g_coupon_user
 *
 * @author api
 * @date 2020-05-20
 */
public class GCouponUser extends BaseEntity {
    private static final long serialVersionUID = 1L;

    /**
     * 主键
     */
    private Long id;

    /**
     * 优惠券id
     */
    @Excel(name = "优惠券id")
    private Long couponId;

    /**
     * 用户id
     */
    @Excel(name = "用户id")
    private Long userId;

    /**
     * 使用状态（0未使用，1已使用，2已过期）
     */
    @Excel(name = "使用状态", readConverterExp = "已使用，未使用，已过期")
    private String statusCode = "0";

    /**
     * 领取时间
     */
    @Excel(name = "领取时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date receiveDate = new Date();

    /**
     * 使用时间
     */
    @Excel(name = "使用时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date useDate;

    /**
     * 使用范围（0全场，1设备采购，2设备租赁，3办公打印）——字典表维护
     */
    @Excel(name = "使用范围", readConverterExp = "全场，设备采购，设备租赁，办公打印")
    private String useScopeCode;

    public GCouponUser(Long couponId, Long userId,String useScopeCode) {
        this.couponId = couponId;
        this.userId = userId;
        this.useScopeCode=useScopeCode;
    }

    public GCouponUser() {
    }

    public void setId(Long id) {
        this.id = id;
    }

    public Long getId() {
        return id;
    }

    public void setCouponId(Long couponId) {
        this.couponId = couponId;
    }

    public Long getCouponId() {
        return couponId;
    }

    public void setUserId(Long userId) {
        this.userId = userId;
    }

    public Long getUserId() {
        return userId;
    }

    public void setStatusCode(String statusCode) {
        this.statusCode = statusCode;
    }

    public String getStatusCode() {
        return statusCode;
    }

    public void setReceiveDate(Date receiveDate) {
        this.receiveDate = receiveDate;
    }

    public Date getReceiveDate() {
        return receiveDate;
    }

    public void setUseDate(Date useDate) {
        this.useDate = useDate;
    }

    public Date getUseDate() {
        return useDate;
    }

    public String getUseScopeCode() {
        return useScopeCode;
    }

    public void setUseScopeCode(String useScopeCode) {
        this.useScopeCode = useScopeCode;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
                .append("id", getId())
                .append("couponId", getCouponId())
                .append("userId", getUserId())
                .append("statusCode", getStatusCode())
                .append("receiveDate", getReceiveDate())
                .append("useDate", getUseDate())
                .append("useScopeCode", getUseScopeCode())

                .toString();
    }
}
